#ifndef OPERATION_DIALOG_H
#define OPERATION_DIALOG_H

#include <QDialog>
#include <QLabel>
#include <QListWidget>
#include <QListWidgetItem>
#include <QStackedWidget>
#include <QImage>

#include "image.h"
#include <vector>

#define ADDITION "Soma"
#define SUBTRACTION "Subtração"
#define MULTIPLICATION "Multiplicação"
#define DIVISION "Divisão"


class OperationDialog : public QDialog{
    Q_OBJECT

    public:
        OperationDialog(QWidget *, std::vector<QImage *>, std::vector<QString>);
        ~OperationDialog();

        void changeFilter(QString);

    signals:
        void done(QImage *);
        void done();
        void cancel();

    public slots:
        void apply();
        void notApply();
        void changePage(QListWidgetItem *, QListWidgetItem *);
        void tryOperation();
//        void addiction();
//        void subtraction();
//        void multiplication();
//        void division();

    private:
        void createIcons();
        void addButton(QListWidgetItem *, QString, QString);

        void update();
//        void revert();

        std::vector<QImage *> originalImages;
        QImage *testImage;

        Image *preview;
        QListWidget *contentsWidget;
        QStackedWidget *pagesWidget;
};

#endif
